package com.lwlean.test.twilio;

import com.twilio.twiml.Language;
import com.twilio.twiml.Say;
import com.twilio.twiml.TwiMLException;
import com.twilio.twiml.VoiceResponse;

/**
 * Created by lean on 2017/7/19.
 */
public class SayExample {

    public static void main(String[] args) {
        Say say = new Say.Builder("呼叫贾鹏伟这是测试电话请不要挂机").voice(Say.Voice.WOMAN)
                .language(Language.ZH_CN).build();
        VoiceResponse response = new VoiceResponse.Builder().say(say).build();

        try {
            System.out.println(response.toXml());
        } catch (TwiMLException e) {
            e.printStackTrace();
        }
    }

}
